# Contributor: Sam Whited <sam@samwhited.com>
# Maintainer: Sam Whited <sam@samwhited.com>
pkgname=py3-pycares
_pkgname=pycares
pkgver=4.2.1
pkgrel=0
pkgdesc="A library for performing DNS resolutions using c-ares."
url="https://pypi.org/project/aiosasl/"
arch="all"
license="MIT"
depends="python3 py3-idna py3-cffi"
makedepends="py3-setuptools c-ares-dev python3-dev"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # tests not included in source package.

build() {
	export PYCARES_USE_SYSTEM_LIB=1
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm644 LICENSE README.rst -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
8cbfb35fea899f1084edf8b09d50e0d4f372b8267b9cb3b27545c458886582eab1a7cd43fbbfcd2956fc767ef51cf0456d521564fab6acc129365f6ddee71f42  pycares-4.2.1.tar.gz
"
